#ifndef COLORSELECT_H
#define COLORSELECT_H

#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QTimer>
#include "QtColorTriangle.h"
#include "../Common/led.h"

namespace Ui {
class ColorSelect;
}

class ColorSelect : public QWidget
{
	Q_OBJECT

public:
	explicit ColorSelect(QWidget *parent = 0);
	~ColorSelect();

	void setLedList(QList<Led*>*list){LedList = list;}

private:
	Ui::ColorSelect *ui;
	QList<Led*> *LedList;
	QtColorTriangle* colorPicker;
	QLabel* currLabel;
	QLineEdit* editR, *editG, *editB;
	QLabel* labelR, *labelG, *labelB;
    QTimer* TimeEvent;


public slots:
	void onColorChanged(const QColor &col);
	void onEditFinished();
    void onTimerr();

signals:
	void colorChanged();
};

#endif // COLORSELECT_H
